import request from "@/utils/request";
import { getRefreshToken } from "@/utils/auth";

// 登录方法
export function login(data) {
  return request({
    url: "/system/auth/weblogin",
    headers: {
      isToken: false,
    },
    method: "post",
    data: data,
  });
}

// 刷新访问令牌
export function refreshToken() {
  return service({
    url: "/system/auth/refresh-token?refreshToken=" + getRefreshToken(),
    method: "post",
  });
}
